#include "DataFormatRecogn.h"

class CDataFormat;

#define DATA_FORMAT_COUNT 2
typedef enum PACK_TYPE
{
	PT_H3C_A,
	PT_NULL
}PACK_TYPE;

char strEnumPackType[DATA_FORMAT_COUNT][64];


void GetListManagePtr(PVOID pListManage)
{

}

int GetPackType(char* pPackData)
{
	u_char cBit1 = (u_char)pPackData[0];
	u_char cBit2 = (u_char)pPackData[1];

	//printf("%02X-%02X",cBit1,cBit2);

	if (cBit1 == 0x7c && cBit2 == 0x83)
	{
		return PT_H3C_A;
	}

	return PT_NULL;
}

int GetPackTypeFromString(char* pPackType)
{
	for (int i = 0;i<DATA_FORMAT_COUNT;i++)
	{
		if (strcmp(pPackType,strEnumPackType[i]) == 0)
		{
			return (PACK_TYPE)i;
		}	
	}

	return PT_NULL;
}

PVOID GetDataFormatObj(int enumPackType) //PACK_TYPE enumPackType
{
	CDataFormat* pDataFormat = NULL;
	switch((PACK_TYPE)enumPackType)
	{
	case PT_H3C_A:
		
		break;
	default:
		//pDataFormat = (CDataFormat*)&m_oH3CFormat;
		break;
	}
	return pDataFormat;
}


